﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Web;
using System.Diagnostics;
using System.Drawing;
using System.ServiceModel.Description;
using System.ServiceModel;

namespace MyWcfRestLib.SamplePictureService
{
    public class PictureTransferService : WcfService
    {
        public PictureTransferService(int port) : base(port) { }

        protected override string ServiceName
        {
            get { return "Picture"; }
        }

        protected override Type ServiceType
        {
            get { return typeof(PictureTransfer); }
        }

        protected override void AddTheService()
        {
            Debug.Assert(null != ServiceHost);

            // Add application endpoint
            ServiceHost.AddServiceEndpoint(
                typeof(IPictureTransfer),
                new WebHttpBinding() { MaxReceivedMessageSize = Constant.MaxMessageSize },
                "");

        }
    }
}
